// The Vue build version to load with the `import` command (runtime-only or standalone) has been set in webpack.base.conf with an alias.
//注意，因为我们index.js中把i18n绑定到了window，所以要在第一个引入
import i18n from "./basic/i18n";
import Vue from "vue";
import router from "./basic/router";
import store from "./basic/stores";
import App from "./App.vue";
import Mixin from "./basic/mixin";
import Global from "./basic/global";
import ElementUI from "./basic/elementui";
import Extensions from "./basic/Extensions";
import "./common.js";

if (process.env.NODE_ENV === "development") {
	Vue.config.devtools = true;
	Vue.config.performance = true;
}

Vue.config.productionTip = false;
Vue.mixin(Mixin);
Vue.use(Global);
Vue.use(ElementUI);
Vue.use(Extensions);
/* eslint-disable no-new */
const app = new Vue({
	el: "#app",
	i18n,
	router,
	store,
	render: h => h(App),
	components: {App},
	template: "<App/>"
});
// 将方法挂载到vue原型上，获取App.vue组件
console.log("app => ", app);
console.log("routes => ", app.$router.options.routes);
